import streamlit as st
import base64
left_column = st.sidebar
left_column.title('🤖系统设置🤖')
quit = left_column.button('点击退出账号')
reset = left_column.button('修改用户密码')
chart = left_column.button('展示不同职业用户数')
bt = left_column.button('AI答疑解惑助手')
bt1 = left_column.button('地理助手')
bt2 = left_column.button('AI拟人助手')
if bt:
    st.switch_page("pages/chatbot.py")
if bt1:
    st.switch_page("pages/dfswbot.py")
if bt2:
    st.switch_page("pages/aibot.py")
if quit:
    st.switch_page("login.py")
def main_bg(main_bg):
    main_bg_ext = "png"
    st.markdown(
        f"""
         <style>
         .stApp {{
             background: url(data:image/{main_bg_ext};base64,{base64.b64encode(open(main_bg, "rb").read()).decode()});
             background-size: cover
         }}
         </style>
         """,
        unsafe_allow_html=True
    )

# 调用
main_bg('pages/login1.jpg')

